Skip to content

Fix issue loading for project links with URL fragments - #782

Open
GuillermoBarreto wants to merge 1 commit into
firstcontributions:mainfrom
GuillermoBarreto:fix/issue-list-url-fragment
Open

GuillermoBarreto wants to merge 1 commit into
firstcontributions:mainfrom
GuillermoBarreto:fix/issue-list-url-fragment

Conversation

@GuillermoBarreto

Copy link
Copy Markdown

Several project links in projects.js point at a section of a repo page, e.g. https://github.com/SimplQ/simplQ-frontend#contributing. extractRepoInfo() matched the repo name as 'simplQ-frontend#contributing', so the issues API request was built with the fragment in it. The fragment swallows the /issues path and query string, the fetch returns a repo object instead of an issue list, and the card falls back to 'No beginner-friendly issues' even when the project has open good-first-issues.

This strips any query string / fragment (and a trailing slash) from the URL before extracting owner/repo. It fixes issue loading for the 5 affected cards (SimplQ, Markdown Dungeon, start-here-guidelines, CSS-Art, Idea Hub) and leaves every other link resolving exactly as before.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant